//
//  WCNServiceSettingController.m
//  WCN
//
//  Created by wsj2015 on 15/9/9.
//  Copyright (c) 2015年 ShanghaiCize Trade And Business Co., Ltd. All rights reserved.
//

#import "WCNServiceSettingController.h"
#import "Macros.h"
#import "WCNConsultServiceController.h"
@interface WCNServiceSettingController ()
{
    NSArray *_titleArray;
}
@end

@implementation WCNServiceSettingController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.tableView.backgroundColor =kAppBg;
    self.title =@"服务设置";

   
    
    self.tableView.frame = CGRectMake(0, 20, 100, 100);
     self.tableView.contentInset =UIEdgeInsetsMake(20, 0, 0, 0);
    self.tableView.separatorColor =kBorderColor;
//    self.tableView.separatorStyle =UITableViewCellSeparatorStyleNone;
     self.tableView.alwaysBounceVertical =NO;
    

    
    _titleArray =@[@"上门护理",@"定点服务",@"护理咨询"];
    
}
-(void)loadView
{
    [super loadView];
    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    return 1;
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{   NSLog(@"%li",_titleArray.count);
    return _titleArray.count;
    
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *cellId =@"cellId";
    UITableViewCell *cell =[tableView dequeueReusableCellWithIdentifier:cellId];
    if (cell == nil) {
        cell =[[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellId];
    }
    cell.accessoryType =UITableViewCellAccessoryDisclosureIndicator;
    cell.textLabel.text =_titleArray[indexPath.row];
    cell.selectionStyle =UITableViewCellSelectionStyleNone;
    return cell;
    
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    if (indexPath.row ==0) {
        
    }else if (indexPath.row ==1){
    
    }else{
        WCNConsultServiceController *vc =[[WCNConsultServiceController alloc]init];
        [self.navigationController pushViewController:vc animated:YES];
    
    }
    
    
    
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return  45;
    
}
@end
